package com.tledu.springboot04.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tledu.springboot04.domain.Address;
import com.tledu.springboot04.domain.User;
import com.tledu.springboot04.mapper.IAddressMapper;
import com.tledu.springboot04.service.IAddressService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;

import java.sql.Wrapper;
import java.util.List;

@Service
public class AddressServiceImpl extends BaseServiceImpl<Address, IAddressMapper> implements IAddressService {
    public AddressServiceImpl(IAddressMapper addressMapper) {
        super(addressMapper);
    }

    //    private final IAddressMapper addressMapper;
//
//    @Override
//    public List<Address> list() {
////        // 构造了一个查询条件
////        QueryWrapper<Address> wrapper = new QueryWrapper<Address>();
////        wrapper.eq("phone", "17300102241");
//        LambdaQueryWrapper<Address> wrapper = new LambdaQueryWrapper<>();
//        wrapper.eq(Address::getPhone, "13014338982");
//        return addressMapper.selectList(wrapper);
//    }
//
//
//    public void add(Address address) {
//        addressMapper.insert(address);
//    }
}
